Optimal. Leaf size=31 \[ -\log (a-x)-\frac {2 \tan ^{-1}\left (\frac {a+2 x}{\sqrt {3} a}\right )}{\sqrt {3}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {1868, 31, 617, 204} \[ -\log (a-x)-\frac {2 \tan ^{-1}\left (\frac {a+2 x}{\sqrt {3} a}\right )}{\sqrt {3}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 204
Rule 617
Rule 1868
Rubi steps
\begin {align*} \int \frac {x (2 a+x)}{a^3-x^3} \, dx &=-\left (a \int \frac {1}{a^2+a x+x^2} \, dx\right )-\int \frac {1}{-a+x} \, dx\\ &=-\log (a-x)+2 \operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1+\frac {2 x}{a}\right )\\ &=-\frac {2 \tan ^{-1}\left (\frac {a+2 x}{\sqrt {3} a}\right )}{\sqrt {3}}-\log (a-x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 58, normalized size = 1.87 \[ \frac {1}{3} \left (-\log \left (x^3-a^3\right )+\log \left (a^2+a x+x^2\right )-2 \log (x-a)-2 \sqrt {3} \tan ^{-1}\left (\frac {a+2 x}{\sqrt {3} a}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.60, size = 28, normalized size = 0.90 \[ -\frac {2}{3} \, \sqrt {3} \arctan \left (\frac {\sqrt {3} {\left (a + 2 \, x\right )}}{3 \, a}\right ) - \log \left (-a + x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.15, size = 29, normalized size = 0.94 \[ -\frac {2}{3} \, \sqrt {3} \arctan \left (\frac {\sqrt {3} {\left (a + 2 \, x\right )}}{3 \, a}\right ) - \log \left ({\left | -a + x \right |}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 29, normalized size = 0.94 \[ -\frac {2 \sqrt {3}\, \arctan \left (\frac {\left (a +2 x \right ) \sqrt {3}}{3 a}\right )}{3}-\ln \left (-a +x \right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 2.84, size = 28, normalized size = 0.90 \[ -\frac {2}{3} \, \sqrt {3} \arctan \left (\frac {\sqrt {3} {\left (a + 2 \, x\right )}}{3 \, a}\right ) - \log \left (-a + x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.03, size = 27, normalized size = 0.87 \[ \frac {2\,\sqrt {3}\,\mathrm {atan}\left (\frac {\sqrt {3}\,a}{a+2\,x}\right )}{3}-\ln \left (x-a\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [C] time = 0.17, size = 54, normalized size = 1.74 \[ - \log {\left (- a + x \right )} + \frac {\sqrt {3} i \log {\left (\frac {a}{2} - \frac {\sqrt {3} i a}{2} + x \right )}}{3} - \frac {\sqrt {3} i \log {\left (\frac {a}{2} + \frac {\sqrt {3} i a}{2} + x \right )}}{3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________